#include "asm/regdef.h"
#include "asm/asm.h"
#include "inst_test.h"
#include "trap.h"

    .set noreorder
    .set noat 
    .global main 
    .text 

main:
    ###test inst
    TEST_LUI(0x00005f00, 0x5f000000)
    TEST_LUI(0x00007d9c, 0x7d9c0000)
    TEST_LUI(0x00006599, 0x65990000)
    TEST_LUI(0x00001de0, 0x1de00000)
    TEST_LUI(0x0000d948, 0xd9480000)
    TEST_LUI(0x0000bd60, 0xbd600000)
    TEST_LUI(0x000049d0, 0x49d00000)
    TEST_LUI(0x000038cd, 0x38cd0000)
    TEST_LUI(0x00001d4a, 0x1d4a0000)
    TEST_LUI(0x0000aabc, 0xaabc0000)
    TEST_LUI(0x0000f425, 0xf4250000)
    TEST_LUI(0x00002da8, 0x2da80000)
    TEST_LUI(0x00008e8f, 0x8e8f0000)
    TEST_LUI(0x0000f6d2, 0xf6d20000)
    TEST_LUI(0x0000c76c, 0xc76c0000)
    TEST_LUI(0x000039c5, 0x39c50000)
    TEST_LUI(0x00005064, 0x50640000)
    TEST_LUI(0x00006280, 0x62800000)
    TEST_LUI(0x00003ff0, 0x3ff00000)
    TEST_LUI(0x00003976, 0x39760000)
    TEST_LUI(0x0000bde8, 0xbde80000)
    TEST_LUI(0x00002338, 0x23380000)
    TEST_LUI(0x0000831a, 0x831a0000)
    TEST_LUI(0x0000822e, 0x822e0000)
    TEST_LUI(0x0000f510, 0xf5100000)
    TEST_LUI(0x00008d60, 0x8d600000)
    TEST_LUI(0x00003f20, 0x3f200000)
    TEST_LUI(0x0000df4e, 0xdf4e0000)
    TEST_LUI(0x00006a58, 0x6a580000)
    TEST_LUI(0x00004db6, 0x4db60000)
    TEST_LUI(0x00009170, 0x91700000)
    TEST_LUI(0x0000ed30, 0xed300000)
    TEST_LUI(0x00008a8c, 0x8a8c0000)
    TEST_LUI(0x00005881, 0x58810000)
    TEST_LUI(0x00007996, 0x79960000)
    TEST_LUI(0x0000b62a, 0xb62a0000)
    TEST_LUI(0x000024b4, 0x24b40000)
    TEST_LUI(0x00004342, 0x43420000)
    TEST_LUI(0x0000126f, 0x126f0000)
    TEST_LUI(0x00005234, 0x52340000)
    TEST_LUI(0x0000db2a, 0xdb2a0000)
    TEST_LUI(0x0000c6e4, 0xc6e40000)
    TEST_LUI(0x00008eb4, 0x8eb40000)
    TEST_LUI(0x0000cf57, 0xcf570000)
    TEST_LUI(0x0000926e, 0x926e0000)
    TEST_LUI(0x00004255, 0x42550000)
    TEST_LUI(0x00000280, 0x02800000)
    TEST_LUI(0x0000eacc, 0xeacc0000)
    TEST_LUI(0x00005fe8, 0x5fe80000)
    TEST_LUI(0x00007dda, 0x7dda0000)
    TEST_LUI(0x00004996, 0x49960000)
    TEST_LUI(0x0000767a, 0x767a0000)
    TEST_LUI(0x00000c72, 0x0c720000)
    TEST_LUI(0x00003324, 0x33240000)
    TEST_LUI(0x00001cd4, 0x1cd40000)
    TEST_LUI(0x0000ee2c, 0xee2c0000)
    TEST_LUI(0x00005935, 0x59350000)
    TEST_LUI(0x00009458, 0x94580000)
    TEST_LUI(0x00003256, 0x32560000)
    TEST_LUI(0x00009914, 0x99140000)
    TEST_LUI(0x0000a590, 0xa5900000)
    TEST_LUI(0x0000b880, 0xb8800000)
    TEST_LUI(0x0000f76a, 0xf76a0000)
    TEST_LUI(0x00002e02, 0x2e020000)
    TEST_LUI(0x000028e6, 0x28e60000)
    TEST_LUI(0x0000c120, 0xc1200000)
    TEST_LUI(0x0000aa91, 0xaa910000)
    TEST_LUI(0x00002c84, 0x2c840000)
    TEST_LUI(0x0000f21e, 0xf21e0000)
    TEST_LUI(0x0000ebcb, 0xebcb0000)
    TEST_LUI(0x0000ba3a, 0xba3a0000)
    TEST_LUI(0x00002b51, 0x2b510000)
    TEST_LUI(0x0000354c, 0x354c0000)
    TEST_LUI(0x0000c055, 0xc0550000)
    TEST_LUI(0x0000f98b, 0xf98b0000)
    TEST_LUI(0x000056da, 0x56da0000)
    TEST_LUI(0x0000fc0a, 0xfc0a0000)
    TEST_LUI(0x0000a144, 0xa1440000)
    TEST_LUI(0x00001409, 0x14090000)
    TEST_LUI(0x0000c552, 0xc5520000)
    TEST_LUI(0x00009d60, 0x9d600000)
    TEST_LUI(0x0000684b, 0x684b0000)
    TEST_LUI(0x0000ef08, 0xef080000)
    TEST_LUI(0x0000099a, 0x099a0000)
    TEST_LUI(0x000059ac, 0x59ac0000)
    TEST_LUI(0x0000dd34, 0xdd340000)
    TEST_LUI(0x00003938, 0x39380000)
    TEST_LUI(0x000089e0, 0x89e00000)
    TEST_LUI(0x0000d1ec, 0xd1ec0000)
    TEST_LUI(0x00001824, 0x18240000)
    TEST_LUI(0x0000207e, 0x207e0000)
    TEST_LUI(0x00002558, 0x25580000)
    TEST_LUI(0x0000070e, 0x070e0000)
    TEST_LUI(0x00007283, 0x72830000)
    TEST_LUI(0x0000e7e0, 0xe7e00000)
    TEST_LUI(0x000085c4, 0x85c40000)
    TEST_LUI(0x0000fb40, 0xfb400000)
    TEST_LUI(0x00001ce3, 0x1ce30000)
    TEST_LUI(0x00004694, 0x46940000)
    TEST_LUI(0x00003340, 0x33400000)
    TEST_LUI(0x00005cf3, 0x5cf30000)
    TEST_LUI(0x00003242, 0x32420000)
    TEST_LUI(0x0000cf48, 0xcf480000)
    TEST_LUI(0x0000b208, 0xb2080000)
    TEST_LUI(0x00001d46, 0x1d460000)
    TEST_LUI(0x0000311b, 0x311b0000)
    TEST_LUI(0x0000435c, 0x435c0000)
    TEST_LUI(0x0000f692, 0xf6920000)
    TEST_LUI(0x0000eeaa, 0xeeaa0000)
    TEST_LUI(0x0000d870, 0xd8700000)
    TEST_LUI(0x0000fae5, 0xfae50000)
    TEST_LUI(0x0000228f, 0x228f0000)
    TEST_LUI(0x00006440, 0x64400000)
    TEST_LUI(0x00004410, 0x44100000)
    TEST_LUI(0x00003560, 0x35600000)
    TEST_LUI(0x00005db0, 0x5db00000)
    TEST_LUI(0x0000ade0, 0xade00000)
    TEST_LUI(0x00003b96, 0x3b960000)
    TEST_LUI(0x0000e390, 0xe3900000)
    TEST_LUI(0x000095b9, 0x95b90000)
    TEST_LUI(0x0000cf28, 0xcf280000)
    TEST_LUI(0x00004d69, 0x4d690000)
    TEST_LUI(0x00000016, 0x00160000)
    TEST_LUI(0x000094c5, 0x94c50000)
    TEST_LUI(0x0000d436, 0xd4360000)
    TEST_LUI(0x000094aa, 0x94aa0000)
    TEST_LUI(0x00003f08, 0x3f080000)
    TEST_LUI(0x000078fe, 0x78fe0000)
    TEST_LUI(0x00007d2d, 0x7d2d0000)
    TEST_LUI(0x00002c0a, 0x2c0a0000)
    TEST_LUI(0x000088d5, 0x88d50000)
    TEST_LUI(0x0000b39d, 0xb39d0000)
    TEST_LUI(0x0000ca81, 0xca810000)
    TEST_LUI(0x0000b19c, 0xb19c0000)
    TEST_LUI(0x00003817, 0x38170000)
    TEST_LUI(0x00007870, 0x78700000)
    TEST_LUI(0x0000236f, 0x236f0000)
    TEST_LUI(0x000035c0, 0x35c00000)
    TEST_LUI(0x00006178, 0x61780000)
    TEST_LUI(0x0000a04c, 0xa04c0000)
    TEST_LUI(0x00002f68, 0x2f680000)
    TEST_LUI(0x0000b830, 0xb8300000)
    TEST_LUI(0x00009f80, 0x9f800000)
    TEST_LUI(0x0000af7a, 0xaf7a0000)
    TEST_LUI(0x000083c5, 0x83c50000)
    TEST_LUI(0x000089aa, 0x89aa0000)
    TEST_LUI(0x00003218, 0x32180000)
    TEST_LUI(0x0000767e, 0x767e0000)
    TEST_LUI(0x0000d9de, 0xd9de0000)
    TEST_LUI(0x000078f6, 0x78f60000)
    TEST_LUI(0x00004bf6, 0x4bf60000)
    TEST_LUI(0x0000fbea, 0xfbea0000)
    TEST_LUI(0x00009f40, 0x9f400000)
    TEST_LUI(0x00004f8c, 0x4f8c0000)
    TEST_LUI(0x00008d5c, 0x8d5c0000)
    TEST_LUI(0x0000e6b0, 0xe6b00000)
    TEST_LUI(0x00007526, 0x75260000)
    TEST_LUI(0x0000cdb5, 0xcdb50000)
    TEST_LUI(0x00006fa6, 0x6fa60000)
    TEST_LUI(0x00006246, 0x62460000)
    TEST_LUI(0x000025c3, 0x25c30000)
    TEST_LUI(0x0000cc40, 0xcc400000)
    TEST_LUI(0x0000425e, 0x425e0000)
    TEST_LUI(0x000047a9, 0x47a90000)
    TEST_LUI(0x0000ec5c, 0xec5c0000)
    TEST_LUI(0x00004f4f, 0x4f4f0000)
    TEST_LUI(0x00006764, 0x67640000)
    TEST_LUI(0x0000ab11, 0xab110000)
    TEST_LUI(0x0000b530, 0xb5300000)
    TEST_LUI(0x00001840, 0x18400000)
    TEST_LUI(0x0000bec5, 0xbec50000)
    TEST_LUI(0x00006d72, 0x6d720000)
    TEST_LUI(0x0000c8f5, 0xc8f50000)
    TEST_LUI(0x00009236, 0x92360000)
    TEST_LUI(0x0000e5c0, 0xe5c00000)
    TEST_LUI(0x00005f88, 0x5f880000)
    TEST_LUI(0x00002660, 0x26600000)
    TEST_LUI(0x0000b680, 0xb6800000)
    TEST_LUI(0x000002e6, 0x02e60000)
    TEST_LUI(0x000025ae, 0x25ae0000)
    TEST_LUI(0x0000f810, 0xf8100000)
    TEST_LUI(0x0000fca8, 0xfca80000)
    TEST_LUI(0x00001976, 0x19760000)
    TEST_LUI(0x000012ac, 0x12ac0000)
    TEST_LUI(0x00009bf3, 0x9bf30000)
    TEST_LUI(0x00008978, 0x89780000)
    TEST_LUI(0x0000842e, 0x842e0000)
    TEST_LUI(0x00002f16, 0x2f160000)
    TEST_LUI(0x00001a00, 0x1a000000)
    TEST_LUI(0x0000aa14, 0xaa140000)
    TEST_LUI(0x0000fac7, 0xfac70000)
    TEST_LUI(0x00007fb0, 0x7fb00000)
    TEST_LUI(0x00002be1, 0x2be10000)
    TEST_LUI(0x0000ae7b, 0xae7b0000)
    TEST_LUI(0x00000e90, 0x0e900000)
    TEST_LUI(0x00009ae2, 0x9ae20000)
    TEST_LUI(0x000001c6, 0x01c60000)
    TEST_LUI(0x00004dbc, 0x4dbc0000)
    TEST_LUI(0x000004d8, 0x04d80000)
    TEST_LUI(0x00005738, 0x57380000)
    TEST_LUI(0x00000000, 0x00000000)
    HIT_GOOD_TRAP

inst_error:
    HIT_BAD_TRAP